package com.jsy.mini12306.manage.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jsy.mini12306.common.entity.Station;
import com.jsy.mini12306.manage.mapper.StationMapper;
import com.jsy.mini12306.manage.service.StationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 车站（字典表）(Station)表服务实现类
 *
 * @author: SongyangJi
 * @since: 2021-09-01 01:36:35
 * @description:
 */

@Slf4j
@Service("stationService")
public class StationServiceImpl extends ServiceImpl<StationMapper, Station> implements StationService {
    @Resource
    private StationMapper stationMapper;


    @Override
    public List<Station> queryStationsByCity(String cityName) {
        return stationMapper.selectList(new QueryWrapper<Station>().eq("city",cityName));
    }
}